<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>


		<style type="text/css"> body {
			font-size: 13px;
			margin: 10px
		}
		
		#container {
			width: 800px;
			height: 500px;
			border: 1px solid gray;
			margin: auto auto;
		}
		
		#controler {
			text-align: center;
			margin-top: 30px;
		}
		
		</style>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=fl4OAR4eMUTz0BrjNI5Q09gK8ITgoPNN"></script>
		<script type="text/javascript" src="../js/range-data.js"></script>
		<script src="//cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
</head>  
<body>  
<div id="container"></div>  

  
<script type="text/javascript">  
var map = new BMap.Map("container");  
map.centerAndZoom(new BMap.Point(118.301624 , 31.355314),12);  
map.enableScrollWheelZoom(); //允许滚轮缩放
map.enableKeyboard();
map.disableDoubleClickZoom();
map.setMinZoom(11);
map.setMaxZoom(14); 
map.
var i_loc_var_initZoom=12;      
 $.each(ranges, function(num,value) {
 					var vertices=[];
 					
 					for(var i=0;i<value.range.length;i++){
 						 var gps = value.range[i].split(",");
 						 vertices.push(new BMap.Point(gps[0], gps[1]));
 					}
                            
                    //var myCompOverlay = new ComplexCustomOverlay(new BMap.Point(zonePosObj[range.id].x,zonePosObj[range.id].y), zonePosObj[range.id]["title"]);  

                    //map.addOverlay(myCompOverlay);

                    //i_loc_var_myCompOverlay[range.id] = myCompOverlay;     

                    var polygon = new BMap.Polygon(vertices, {
                        strokeColor: "#ff0000",
                        strokeWeight:1, 
                        strokeOpacity:1, 
                        fillOpacity:0.1,
                        fillColor: "",
                        strokeStyle: 'none'
                    });      
					
                    map.addOverlay(polygon);   //增加多边形 

                    polygon.addEventListener("click", function(e){
                    	alert("134");
                    });

                    //allOverlays[range.id] = polygon;           
                });


</script>  
	</body>
</html>
